﻿Option Explicit On
Option Strict On

Public NotInheritable Class StringExt
    Public Shared Function StringFromLeft(ByVal strTmp As String, ByVal strLength As Integer) As String
        If (strLength > 0 AndAlso strTmp.Length >= strLength) Then
            Return strTmp.Substring(0, strLength)
        Else
            Return strTmp
        End If
    End Function

    Public Shared Function StringFromRight(ByVal strTmp As String, ByVal strLength As Integer) As String
        If (strLength > 0 AndAlso strTmp.Length >= strLength) Then
            Return strTmp.Substring(strTmp.Length - strLength, strLength)
        Else
            Return strTmp
        End If
    End Function
End Class